﻿using SQLite.CodeFirst;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tools.Core.Entities;

namespace Tools.Core
{
    public class DB:DbContext
    {
        public DB():base("datadb")
        {
            
        }
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            var initializer = new SqliteDropCreateDatabaseWhenModelChanges<DB>(modelBuilder);
            Database.SetInitializer(initializer);
        }
        public DbSet<MailMessage> MailMessages { get; set; }
        public DbSet<MailSender> MailSenders { get; set; }
        public DbSet<MailReceiver> MailReceivers { get; set; }
        //public DbSet<VideoConvertPlan> VideoConvertPlan { get; set; }

    }
}
